package main

import "fmt"

func main() {
	//print("Hello World")
	//fmt.Println("Hello World")
	//fmt.Printf("w s %s\n", "ss")

	// 向标准输出写入内容
	//fmt.Fprintln(os.Stdout, "向标准输出写入内容")
	//fileObj, err := os.OpenFile("./xx.txt", os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0644)
	//if err != nil {
	//	fmt.Println("打开文件出错，err:", err)
	//	return
	//}
	//name := "枯藤"
	//// 向打开的文件句柄中写入内容
	//fmt.Fprintf(fileObj, "往文件中写如信息：%s", name)

	s1 := fmt.Sprint("Hello World\n")
	name, age := "sss", 0
	s2 := fmt.Sprintf("name:%s,age:%d \n", name, age)
	s3 := fmt.Sprintln(s1, s2)
	fmt.Println(s1, s2, s3)
}
